<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>模拟事件,模仿tmooc首页广告</title>
<script type="text/javascript" src="../jquery-3.1.1.min.js"></script>
<script type="text/javascript">
$(function(){
	$(":button").click(function(){
		$("div:eq(0)").slideUp(1000);
	});
	setTimeout(function(){
		$(":button").trigger("click");		
	},3000);
});
</script>
<style type="text/css">
div{
	height: 800px;
	background: #006699;
	opacity:.3;
}
div input{
	float: right;
	margin: 5px;
}
</style>
</head>
<body>
	<div>
		<input type="button" value="x">
	</div>
</body>
</html>

